import {
	createSSRApp
} from 'vue'
import i18n from './lang/i18n'
// 引入 Pinia
import {
	createPinia
} from 'pinia'
import {
	piniaPluginPersistedstate
} from '@/store/persist'

import App from './App.vue'
export function createApp() {
	const app = createSSRApp(App)
	// 实例化Pinia
	const pinia = createPinia()
	// Pinia 持久化插件
	pinia.use(piniaPluginPersistedstate)
	// 传递给项目应用
	app.use(pinia)
	app.use(i18n)
	return {
		app,
		pinia,
	}
}